﻿using System;

namespace ErikLieben.SharePoint.WebParts
{
    public static class ComparisonExtensions
    {
        public static Boolean IsLessThanOrEqualTo<T>(this T item, T other) where T : IComparable<T>
        {
            //DebugUtil.ShowDebugWarningIf(item == null, "object is null");
            return (item == null) ? false : item.CompareTo(other) <= 0;
        }

    }
}
